package com.block.datapush.service.apipush.utils;

import cn.hutool.core.util.StrUtil;
import com.block.common.enums.BaseTypeInfoEnum;


/**
 * @Author zhujx
 * @Date 2024-01-12
 **/
public class JinGuanJiaUtil {
    //贷款金额
    public static Integer getLoanAmount(String loanAmount) {
        if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la001.getValue(), loanAmount)) {
            return BaseTypeInfoEnum.LoanAmount.la001.getAmount().intValue();
        } else if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la002.getValue(), loanAmount)) {
            return BaseTypeInfoEnum.LoanAmount.la002.getAmount().intValue();
        } else if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la003.getValue(), loanAmount)) {
            return BaseTypeInfoEnum.LoanAmount.la003.getAmount().intValue();
        } else if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la004.getValue(), loanAmount)) {
            return BaseTypeInfoEnum.LoanAmount.la004.getAmount().intValue();
        }
        return BaseTypeInfoEnum.LoanAmount.la005.getAmount().intValue();
    }


    //社保
    public static String getSheBao(String shebao) {
        if (StrUtil.equals(BaseTypeInfoEnum.Shebao.sb001.getValue(), shebao)) {
            return "无社保";
        } else if (StrUtil.equals(BaseTypeInfoEnum.Shebao.sb002.getValue(), shebao)) {
            return "6个月";
        }
        return "12个月";
    }

    public static String getCar1(String car) {
        if (StrUtil.equals(BaseTypeInfoEnum.Car.car001.getValue(), car)) {
            return "无车";
        }
        return "全款";
    }

    public static String getCar2(String car) {
        if (StrUtil.equals(BaseTypeInfoEnum.Car.car001.getValue(), car)) {
            return "无车";
        }else if (StrUtil.equals(BaseTypeInfoEnum.Car.car002.getValue(), car)){
            return "可抵押";
        }
        return "不可抵押";
    }

    public static String getGjj(String gjj) {
        if (StrUtil.equals(BaseTypeInfoEnum.Gjj.gjj001.getValue(), gjj)) {
            return "无";
        }
        return "有";
    }

    public static String getBaoxian(String baoxian) {
        if (StrUtil.equals(BaseTypeInfoEnum.Baoxian.bx001.getValue(), baoxian)) {
            return "无";
        }
        return "有";
    }

    public static String getZhima(String zhima) {
        if (StrUtil.equals(zhima, BaseTypeInfoEnum.Zhima.zm005.getValue())) {
            return "725";
        } else if (StrUtil.equals(zhima, BaseTypeInfoEnum.Zhima.zm004.getValue())) {
            return "680";
        } else if (StrUtil.equals(zhima, BaseTypeInfoEnum.Zhima.zm003.getValue())) {
            return "630";
        }
        return "550";
    }

    public static String getJd(String jd) {
        if (StrUtil.equals(jd, BaseTypeInfoEnum.Baitiao.bt002.getValue())){
            return "30000";
        }else if (StrUtil.equals(jd, BaseTypeInfoEnum.Baitiao.bt003.getValue())){
            return "80000";
        }else if (StrUtil.equals(jd, BaseTypeInfoEnum.Baitiao.bt004.getValue())){
            return "150000";
        }else if (StrUtil.equals(jd, BaseTypeInfoEnum.Baitiao.bt005.getValue())){
            return "250000";
        }
        return "0";
    }

    public static String getHuaBei(String huabei) {
        if (StrUtil.equals(huabei, BaseTypeInfoEnum.Huabei.hb002.getValue())){
            return "30000";
        }else if (StrUtil.equals(huabei, BaseTypeInfoEnum.Huabei.hb003.getValue())){
            return "80000";
        }else if (StrUtil.equals(huabei, BaseTypeInfoEnum.Huabei.hb004.getValue())){
            return "150000";
        }else if (StrUtil.equals(huabei, BaseTypeInfoEnum.Huabei.hb005.getValue())){
            return "250000";
        }
        return "0";
    }


}
